-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using protected members outside scope #1083
Conversation
Relates elastic#838
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hub-cap you have a conflict here to resolve.
Whilst disabling warnings for tests makes sense, have we checked we can't mitigate some of these by just exposing accessors for the variables?
The way I look at it, since these are almost all tests,. it doesn't make a ton of sense to expose members for them. Looks like there are a few new things to clean up, im working on them now. |
@hub-cap see #1106 (review) why this maybe failed. @danielmitterdorfer corrected the reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See changes due to #1106
esrally/track/params.py
Outdated
self.template_definitions.append((template.name, body)) | ||
else: | ||
raise exceptions.InvalidSyntax("Please set the properties 'template' and 'body' for the " | ||
f"{params.get('operation-type')} operation or declare composable and/or component " | ||
"templates in the track") | ||
|
||
@staticmethod | ||
def _create_or_merge(content, path, new_content): | ||
def create_or_merge(self, content, path, new_content): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to do this anymore - See #1106
esrally/track/params.py
Outdated
return original_content | ||
|
||
@staticmethod | ||
def __merge(dct, merge_dct): | ||
def merge(self, dct, merge_dct): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
I reverted the code for that, ty @gingerwizard for the pointer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now we have the other change. You have a conflict but this looks easily fixed.
With this commit we reenable the pylint check
W0212
which checkswhether protected members are used outside of their classes scope.
Relates #838